package com.xiaokai.domain.strategy.service.armory;

import java.util.Date;

/**
 * Author:yang
 * Date:2024-08-24 11:04
 * Description:策略调度接口
 */
public interface IStrategyDispatch {
    /**
     * 获取随机奖品ID
     * @param strategyId 策略ID
     * @return 奖品ID
     */
    Integer getRandomAwardId(Long strategyId);

    Integer getRandomAwardId(Long strategyId,String ruleWeightValue);

    /**
     * 根据策略ID和奖品ID，扣减奖品缓存库存
     *
     * @param strategyId  策略ID
     * @param awardId     奖品ID
     * @param endDateTime 活动结束时间
     * @return 扣减结果
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId, Date endDateTime);
}

